﻿using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace MachineVision.Domain.Migrations
{
    public partial class yunmouDB : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Tokens_YunMou",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    AccessToken = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExpirationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    Inactive = table.Column<bool>(type: "tinyint(1)", nullable: false),
                    CreateTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    Remarks = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Tokens_YunMou", x => x.Id);
                })
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "TemperatureInfos",
                keyColumn: "Id",
                keyValue: 1,
                columns: new[] { "CreateTime", "TempTime" },
                values: new object[] { new DateTime(2022, 8, 17, 16, 7, 4, 644, DateTimeKind.Local).AddTicks(456), new DateTime(2022, 8, 17, 16, 7, 4, 644, DateTimeKind.Local).AddTicks(456) });

            migrationBuilder.UpdateData(
                table: "TemperatureInfos",
                keyColumn: "Id",
                keyValue: 2,
                columns: new[] { "CreateTime", "TempTime" },
                values: new object[] { new DateTime(2022, 8, 17, 16, 7, 4, 644, DateTimeKind.Local).AddTicks(456), new DateTime(2022, 8, 17, 16, 7, 4, 644, DateTimeKind.Local).AddTicks(456) });

            migrationBuilder.UpdateData(
                table: "TemperatureInfos",
                keyColumn: "Id",
                keyValue: 4,
                columns: new[] { "CreateTime", "TempTime" },
                values: new object[] { new DateTime(2022, 8, 17, 16, 7, 4, 644, DateTimeKind.Local).AddTicks(456), new DateTime(2022, 8, 17, 16, 7, 4, 644, DateTimeKind.Local).AddTicks(456) });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Tokens_YunMou");

            migrationBuilder.UpdateData(
                table: "TemperatureInfos",
                keyColumn: "Id",
                keyValue: 1,
                columns: new[] { "CreateTime", "TempTime" },
                values: new object[] { new DateTime(2022, 8, 11, 11, 9, 46, 214, DateTimeKind.Local).AddTicks(5836), new DateTime(2022, 8, 11, 11, 9, 46, 214, DateTimeKind.Local).AddTicks(5836) });

            migrationBuilder.UpdateData(
                table: "TemperatureInfos",
                keyColumn: "Id",
                keyValue: 2,
                columns: new[] { "CreateTime", "TempTime" },
                values: new object[] { new DateTime(2022, 8, 11, 11, 9, 46, 214, DateTimeKind.Local).AddTicks(5836), new DateTime(2022, 8, 11, 11, 9, 46, 214, DateTimeKind.Local).AddTicks(5836) });

            migrationBuilder.UpdateData(
                table: "TemperatureInfos",
                keyColumn: "Id",
                keyValue: 4,
                columns: new[] { "CreateTime", "TempTime" },
                values: new object[] { new DateTime(2022, 8, 11, 11, 9, 46, 214, DateTimeKind.Local).AddTicks(5836), new DateTime(2022, 8, 11, 11, 9, 46, 214, DateTimeKind.Local).AddTicks(5836) });
        }
    }
}
